package com.service.seeparam;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication

// 标明自已为一个服务client
@EnableEurekaClient
public class SeeParamApplication {

    public static void main(String[] args) {
        SpringApplication.run(SeeParamApplication.class, args);
    }

    @Value("${server.port}")
    String port;

    /**
     * 查看参数
     * @param param
     * @return
     */
    @RequestMapping("/seeParam")
    public String seeParam(@RequestParam String param) {
        return " 我的端口是 :" + port + "，你输入的参数是： " + param;
    }

}
